@echo off
chcp 65001 > nul
setlocal enabledelayedexpansion

echo ===== 密码平台前端部署脚本 =====

:: 设置颜色
set "GREEN=[32m"
set "RED=[31m"
set "YELLOW=[33m"
set "RESET=[0m"


:: 部署前端页面
echo.
echo %YELLOW%开始部署前端页面到 Cloudflare Pages...%RESET%
wrangler pages deploy frontend --project-name mimipages

:: 检查部署结果
if errorlevel 1 (
    echo.
    echo %RED%[错误] 部署失败，请检查错误信息%RESET%
    pause
    exit /b 1
) else (
    echo.
    echo %GREEN%[成功] 前端页面已成功部署到 Cloudflare Pages%RESET%
    echo %GREEN%访问地址: https://engpage.pages.dev%RESET%
)

echo.
echo %GREEN%===== 部署完成 =====%RESET%
pause

endlocal 